﻿using LF.Shared.Dtos.Input;
using LF.Shared.Dtos.Out;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LF.Application.Services
{
    public interface IFileService:IApplicationService
    {
        /// <summary>
        /// 上传文件
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Result<FileOut> Upload(FileInput file);
        /// <summary>
        /// 下载文件
        /// </summary>
        /// <param name="md5"></param>
        /// <returns></returns>
        FileContentResult? Download(string md5);
        /// <summary>
        /// 视频文件第一帧
        /// </summary>
        /// <param name="md5">mp4</param>
        /// <returns></returns>
        FileContentResult? GetFirstFrame(string md5);
        /// <summary>
        /// 文件下载2
        /// </summary>
        /// <param name="md5"></param>
        /// <returns></returns>
        FileContentResult? Download2(string md5);
        /// <summary>
        /// 获取文件名
        /// </summary>
        /// <param name="md5"></param>
        /// <returns></returns>
        Result GetFileName(string md5);    

        /// <summary>
        /// 前端直接下载文件
        /// </summary>
        /// <param name="md5">文件md5</param>
        /// <returns>下载链接</returns>
        IActionResult DirectDownload(string md5);
    }
}
